FE-811: Ship-gate rename residue and live mention autocomplete#179
Conversation
5412a06 to
753c9af
Compare
1447843 to
68273e3
Compare
PR SummaryLow Risk Overview Adds faithful and synthetic seed graphs under
Minor: Reviewed by Cursor Bugbot for commit f9ce635. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
Pull request overview
This PR completes FE-811 cleanup by moving graph reads to the new GraphSlice/NodeNeighborhood shapes, regenerating and snapshot-locking graph renderer previews, consolidating edge-category semantics into a single metadata table with projection helpers, and switching mention autocomplete to live selected-spec nodes (removing fixture-backed candidates).
Changes:
- Replace
GraphOverview/NeighborhoodResultwithGraphSlice/NodeNeighborhoodacross web, RPC, probes, and renderers; remove count alias usage in UI/tests. - Add graph projection utilities (
projection/labels.ts,projection/direction.ts) backed by a canonicalEDGE_CATEGORY_METADATApolicy table and exhaustive matrix tests. - Move preview coverage into renderer snapshot tests, retire the old preview script pipeline, and wire
#mention autocomplete to live graph reads.
Reviewed changes
Copilot reviewed 145 out of 146 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/web/rpc-client.ts | Removes protocol type re-export from web RPC client surface. |
| src/web/routes/root.tsx | Narrows a previously-exported local type to module scope. |
| src/web/queries/graph.ts | Retypes graph queries to GraphSlice/NodeNeighborhood. |
| src/web/features/graph/GraphOverview.tsx | Uses nodes.length/edges.length instead of count aliases. |
| src/web/app.tsx | Narrows exported router type alias to module scope. |
| src/web/app.test.tsx | Adds/updates tests for new graph RPC shapes and invalidation behavior. |
| src/utils/strings.ts | Adds shared truncate utility. |
| src/session/workspace-session-coordinator.ts | Narrows many exported-only-for-internals types to module scope. |
| src/session/workspace-context.ts | Updates node-count read to queryGraph().nodes.length. |
| src/session/structured-exchange-loop.ts | Narrows internal DTO types to module scope. |
| src/session/runtime-state.ts | Narrows internal selection type to module scope. |
| src/session/project-identity.ts | Narrows internal source type to module scope. |
| src/session/exchange-projection.ts | Narrows internal projection helper types to module scope. |
| src/scripts/render-preview.ts | Deletes retired preview CLI script. |
| src/scripts/README.md | Updates scripts README to reflect no owned utilities. |
| src/rpc/product-updates.ts | Narrows internal topic/listener types to module scope. |
| src/rpc/methods/registry.ts | Narrows internal access type to module scope. |
| src/rpc/methods/graph.ts | Updates graph RPC result schemas + implementation for new read API. |
| src/renderers/graph/previews.test.ts | New snapshot-locked renderer preview test suite. |
| src/renderers/graph/overview.ts | Removes stub overview renderer file. |
| src/renderers/graph/node-neighborhood.ts | New anchor-relative neighborhood renderer using projection helpers. |
| src/renderers/graph/neighborhood.ts | Deletes old projected-neighborhood renderer. |
| src/renderers/graph/neighborhood.test.ts | Deletes old neighborhood preview snapshot test. |
| src/renderers/graph/graph-slice.ts | New GraphSlice formatter (compact/grouped/debug variants). |
| src/renderers/graph/fixture-reads.test-support.ts | Re-exports graph fixture read helpers for renderer tests. |
| src/renderers/graph/previews/neighborhood-hub-REQ1.md | Adds locked neighborhood preview snapshot. |
| src/renderers/graph/previews/neighborhood-hub-REQ1-hops2.md | Adds locked neighborhood preview snapshot (hops=2). |
| src/renderers/graph/previews/neighborhood-hub-REQ1-bounded.md | Adds locked neighborhood preview snapshot (bounded edges). |
| src/renderers/graph/previews/neighborhood-code-health-REQ1.md | Adds locked neighborhood preview snapshot. |
| src/renderers/graph/previews/neighborhood-code-health-R1.preview.md | Removes retired preview snapshot artifact. |
| src/renderers/graph/previews/neighborhood-code-health-R1.md | Removes retired neighborhood snapshot artifact. |
| src/renderers/graph/previews/neighborhood-brunch-self-REQ1.md | Adds locked neighborhood preview snapshot. |
| src/renderers/graph/previews/neighborhood-brunch-self-MOD1-hops2.md | Adds locked neighborhood preview snapshot (hops=2). |
| src/renderers/graph/previews/graph-slice-code-health-grouped-list.md | Adds locked graph-slice grouped-list snapshot. |
| src/renderers/graph/previews/graph-slice-code-health-compact-summary.md | Adds locked graph-slice compact-summary snapshot. |
| src/renderers/graph/previews/graph-slice-category-directions-full-debug.md | Adds locked graph-slice debug snapshot. |
| src/renderers/graph/previews/graph-slice-brunch-self-grouped-list.md | Adds locked graph-slice grouped-list snapshot. |
| src/renderers/graph/previews/graph-slice-alpha-grounding-compact-summary.md | Adds locked graph-slice compact-summary snapshot. |
| src/projections/session/affordances.ts | Narrows internal affordance type to module scope. |
| src/projections/README.md | Adds projection-shape ledger documentation. |
| src/projections/graph/neighborhood.ts | Converts neighborhood projection to deprecated empty topology marker. |
| src/probes/submit-message-capture-proof.ts | Retypes overview reads to GraphSlice and derives counts from arrays. |
| src/probes/submit-message-capture-proof.test.ts | Updates expected node-code prefixes and shapes. |
| src/probes/structured-exchange-ordering-proof.ts | Fixes named import + waiter timeout disposal. |
| src/probes/public-rpc-parity-proof.ts | Narrows internal artifacts type to module scope. |
| src/probes/propose-graph-commit-proof.ts | Retypes overview reads to GraphSlice and derives counts from arrays. |
| src/probes/propose-graph-commit-proof.test.ts | Updates expected node-code prefixes and shapes. |
| src/probes/project-graph-review-cycle-proof.ts | Retypes overview reads to GraphSlice and derives deltas from arrays. |
| src/probes/project-graph-review-cycle-proof.test.ts | Updates expected node-code prefixes and shapes. |
| src/probes/fixture-curation-loop.ts | Retypes overview reads to GraphSlice and derives counts from arrays. |
| src/probes/fixture-curation-loop.test.ts | Updates expected node-code prefixes and shapes. |
| src/probes/fixture-contract-residue.test.ts | Adds guard test against retired fixture/report contract tokens. |
| src/probes/capture-response-to-graph-proof.ts | Retypes overview reads to GraphSlice and derives counts from arrays. |
| src/probes/capture-response-to-graph-proof.test.ts | Updates expected node-code prefixes and shapes. |
| src/probes/capture-quality-loop.ts | Narrows internal scenario/report types to module scope. |
| src/graph/workspace-store.ts | Replaces many read helpers with queryGraph/getNodes API. |
| src/graph/validate-fixture.ts | Adds dev CLI to validate fixtures through real mutation boundary. |
| src/graph/spec-ownership.test.ts | Updates tests to new read API (queryGraph/getNodes). |
| src/graph/schema/reconciliation-need.ts | Narrows internal kind union type to module scope. |
| src/graph/schema/nodes.ts | Updates node-code lexicon (REQ/AC/etc) + improves parsing. |
| src/graph/schema/elicitation-backlog.ts | Narrows internal status type to module scope. |
| src/graph/schema/edges.ts | Narrows internal basis type to module scope. |
| src/graph/review-set.ts | Narrows many internal review-set types to module scope. |
| src/graph/review-set.test.ts | Updates tests to queryGraph and new node-code prefixes. |
| src/graph/render-preview.ts | Deletes retired preview helper module. |
| src/graph/README.md | Updates topology README for policy/projection layout and retired preview helper. |
| src/graph/read-api.test.ts | Adds coverage for queryGraph/getNodes behavior and filtering. |
| src/graph/projection/labels.ts | Adds semantic-label projection helper. |
| src/graph/projection/labels.test.ts | Adds exhaustive label matrix tests. |
| src/graph/projection/direction.ts | Adds impact-axis (up/down/lateral) projection helper. |
| src/graph/projection/direction.test.ts | Adds exhaustive direction matrix tests. |
| src/graph/policy/category-policy.ts | Replaces legacy policy with canonical EDGE_CATEGORY_METADATA. |
| src/graph/policy/category-policy.test.ts | Adds metadata coverage and invariants tests. |
| src/graph/index.ts | Tightens public exports; re-exports new policy/projection helpers. |
| src/graph/fixture-reads.test-support.ts | Adds shared seeded-fixture read helpers for tests/renderers. |
| src/graph/export-fixtures.ts | Renames projection flag to --show (`all |
| src/graph/export-fixtures.test.ts | Updates tests for show: 'active'. |
| src/graph/command-executor/commit-graph-types.ts | Narrows internal success type to module scope. |
| src/graph/command-executor/commit-graph-batch.test.ts | Updates expected requirement node-code prefix to REQ. |
| src/graph/command-executor.ts | Narrows many internal result/detail types to module scope. |
| src/graph/capture/structured-response.test.ts | Updates expected criterion node-code prefix to AC. |
| src/app/brunch-tui.test.ts | Updates mention autocomplete tests to use live graph nodes and no fallback. |
| src/.pi/extensions/system-prompts/index.ts | Updates prompt context graph read path; removes default export. |
| src/.pi/extensions/session/lifecycle.ts | Removes default export. |
| src/.pi/extensions/runtime/index.ts | Removes default export and narrows export surface. |
| src/.pi/extensions/mentions/index.ts | Removes fixture mention source; narrows internal candidate type. |
| src/.pi/extensions/graph/tool-schemas.ts | Renames read flag (projection→show); updates direction type import. |
| src/.pi/extensions/graph/command-adapter.ts | Updates overview/related formatting to new read shapes and lateral labeling. |
| src/.pi/extensions/exchanges/shared/editor-fallback.ts | Narrows internal editor types to module scope. |
| src/.pi/extensions/exchanges/schemas/shared.ts | Removes exported inferred types; keeps schemas. |
| src/.pi/extensions/exchanges/schemas/request.ts | Removes exported inferred types; keeps schemas. |
| src/.pi/extensions/exchanges/schemas/present.ts | Removes exported inferred types; keeps schemas. |
| src/.pi/extensions/exchanges/schemas/capture.ts | Removes exported inferred types; keeps schemas. |
| src/.pi/extensions/exchanges/index.ts | Switches to named import pattern; removes some re-exported types/default export. |
| src/.pi/extensions/context/index.ts | Removes default export. |
| src/.pi/extensions/commands/policy.ts | Removes default export. |
| src/.pi/extensions/commands/index.ts | Removes default export and narrows export surface. |
| src/.pi/extensions/chrome/index.ts | Narrows several internal chrome types to module scope. |
| src/.pi/components/workspace-dialog/model.ts | Narrows internal option type to module scope. |
| src/.pi/components/workspace-dialog/index.ts | Narrows exports to runtime needs. |
| src/.pi/components/workspace-dialog.ts | Narrows exports to runtime needs. |
| src/.pi/components/brunch-identity.ts | Narrows internal identity types to module scope. |
| src/.pi/components/alternatives.ts | Removes default export. |
| src/.pi/brunch-pi-extensions.ts | Builds mention source from live graph deps; narrows re-exports. |
| src/.pi/agents/state.ts | Narrows internal prompt-family type to module scope. |
| src/.pi/agents/index.ts | Narrows re-export surface. |
| src/.pi/agents/contexts/node.ts | Switches node context rendering to new renderer + NodeNeighborhood. |
| src/.pi/agents/contexts/node.test.ts | Deletes old projection-based node-context test. |
| src/.pi/agents/contexts/index.ts | Narrows exports to runtime needs. |
| src/.pi/agents/contexts/graph.ts | Retypes to GraphSlice and uses array lengths for totals. |
| src/.pi/agents/contexts/graph.test.ts | Updates test shapes for GraphSlice. |
| src/.pi/tests/structured-exchange-present-request.test.ts | Switches to named imports from exchanges module. |
| src/.pi/tests/structured-exchange-extension.test.ts | Switches to named imports from exchanges module. |
| src/.pi/tests/prompting.test.ts | Updates graph reads seam to queryGraph/getNodes. |
| src/.pi/tests/extension-registry.test.ts | Updates registry expectations to named exports and removes default-export assertions. |
| package.json | Removes render script; adds targeted renderer test scripts. |
| memory/REFACTOR.md | Deletes temporary refactor execution aid. |
| memory/cards/poc-live-ship-gate--live-mention-autocomplete.md | Deletes superseded scope card. |
| memory/cards/dev-seed-fixtures--semantic-graph-mutations.md | Marks card as superseded and points to replacement. |
| .fixtures/seeds/yamlbase/README.md | Adds seed README for yamlbase faithful spec graph. |
| .fixtures/seeds/rd-loop/README.md | Adds seed README for rd-loop faithful spec graph. |
| .fixtures/seeds/fable/README.md | Adds seed README for fable spec graph. |
| .fixtures/seeds/edge-spread/hub-neighborhood.json | Adds edge-category coverage fixture used by previews. |
| .fixtures/seeds/dumpchat/README.md | Adds seed README for dumpchat spec graph. |
| .fixtures/seeds/brunch-self/README.md | Adds seed README for repo self-described spec graph. |
| .fixtures/seeds/bilal-port/duplicate-edge-policy.ts | Narrows internal type to module scope. |
| .fixtures/runs/project-graph-review-cycle/2026-06-06-project-graph-review-cycle/report.json | Updates topic/artifact reference in committed run report. |
| .fixtures/runs/project-graph-review-cycle/2026-06-06-project-graph-review-cycle/graph-overview.json | Updates committed graph overview artifact formatting/whitespace. |
| .fixtures/runs/fixture-curation/fixture-curation-2026-06-05T104440Z/report.json | Updates artifact reference in committed run report. |
Comments suppressed due to low confidence (1)
.fixtures/runs/project-graph-review-cycle/2026-06-06-project-graph-review-cycle/graph-overview.json:1077
- This committed
graph-overview.jsonstill contains the retirednodeCount/edgeCountaliases, but the codebase has movedGraphSlice/graph.overviewto derive counts fromnodes.length/edges.length. Keeping these fields in the committed artifact means the fixture was not actually regenerated and will drift from the current contract.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| export function truncate(value: string, maxLength: number): string { | ||
| return value.length <= maxLength ? value : `${value.slice(0, maxLength - 1)}…`; |
| const projected: ProjectedEdge[] = []; | ||
| const seen = new Set<string>(); | ||
| let ambient = 0; | ||
|
|
||
| for (const edge of result.edges) { | ||
| if (edge.sourceId !== anchorId && edge.targetId !== anchorId) { | ||
| ambient++; | ||
| continue; | ||
| } | ||
| const anchorRole: EdgeEndpoint = edge.sourceId === anchorId ? 'source' : 'target'; | ||
| const otherId = anchorRole === 'source' ? edge.targetId : edge.sourceId; | ||
|
|
||
| const dedupeKey = `${edge.category}|${otherId}`; | ||
| if (seen.has(dedupeKey)) continue; | ||
| seen.add(dedupeKey); |
| "runDir": "runs/fixture-curation/fixture-curation-2026-06-05T104440Z", | ||
| "sessionJsonl": "runs/fixture-curation/fixture-curation-2026-06-05T104440Z/session.jsonl", | ||
| "transcriptMarkdown": "runs/fixture-curation/fixture-curation-2026-06-05T104440Z/transcript.md", | ||
| "reportJson": "runs/fixture-curation/fixture-curation-2026-06-05T104440Z/report.json", | ||
| "graphSnapshotJson": "runs/fixture-curation/fixture-curation-2026-06-05T104440Z/graph-snapshot.json" | ||
| "graphOverviewJson": "runs/fixture-curation/fixture-curation-2026-06-05T104440Z/graph-overview.json" | ||
| } |
| "productUpdates": [ | ||
| { | ||
| "topic": "workspace.snapshot", | ||
| "topic": "workspace.state", | ||
| "specId": 1, | ||
| "sessionId": "019e9d3e-7f21-76ae-bbc2-2955f779cdac" | ||
| }, |
…ojections Replace the two drifting category→metadata tables (EDGE_CATEGORY_METADATA in schema/edges.ts and the drifted CATEGORY_POLICY) with a single EDGE_CATEGORY_METADATA in policy/category-policy.ts. The old pair disagreed on impact direction for proof/support; the consolidated table carries endpoint roles, impact direction+strength (none/advisory/cascade), criteria-help, and projection effect in one place. Add two anchor-relative projections derived from it: - projection/labels.ts: direction-aware semantic phrasing (two-tier). - projection/direction.ts: upstream/downstream/lateral for the reconciliation flow, derived from the impact columns. Wire node-neighborhood renderer to group incident edges by directional relation and label each line semantically; retire the inline endpoint role-token leak (graph-slice + edges.ts return to baseline). Reconcile GRAPH_MODEL.md and graph/README.md to the new shape. Amp-Thread-ID: https://ampcode.com/threads/T-019ea862-2101-73ce-8c08-09aca617f03a Co-authored-by: Amp <amp@ampcode.com>
Add edge-spread/hub-neighborhood.json: one requirement anchor wired to naturally-typed neighbors covering every edge category in both relation directions, both proof/support stances, the three realization refinements (expresses / implemented by / established by), hard vs soft impact, a lateral association, and an ambient cross-neighbor edge. Lock three renderer previews exercising the projection layer: - neighborhood-hub-REQ1: integrated directional + semantic render (hops=1) - neighborhood-hub-REQ1-hops2: ambient-edge counting at hops=2 - graph-slice-category-directions-full-debug: anchorless flat edge render across all categories (regression-guards the reverted slice renderer) Amp-Thread-ID: https://ampcode.com/threads/T-019ea862-2101-73ce-8c08-09aca617f03a Co-authored-by: Amp <amp@ampcode.com>
…shape-only renderer previews Split verification along the design seam: labels and directionality are pure functions, so they own correctness; renderers own only output shape. Projection unit tests, now the full executable lookup matrices: - labels.test.ts: every Tier-1 (category, anchorRole, stance) base cell + every Tier-2 (category, sourceKind, targetKind) realization refinement. - direction.test.ts: every category's impact axis and the neighbor relation+strength from both anchor endpoints. Renderer tests consolidated into one home, src/renderers/graph/previews.test.ts: - the locked __previews__/*.md snapshot IS the assertion; positive 'looks like X' string matches removed (the projection matrices prove those). - only cross-cutting shape invariants kept: no raw structural vocabulary leaks into anchored projections, and large-graph slices stay bounded. - adds neighborhood-hub-REQ1-bounded preview locking maxEdges omission. - retires graph-slice.test.ts, node-neighborhood.test.ts, node-neighborhood-spread.test.ts, and the .pi wrapper node.test.ts (the wrapper is a pure pass-through; maxNeighbors dead option dropped). Also lands the architecture-boundary fix from the parallel agent: the real fixture-reads.test-support implementation moves to src/graph/, leaving a re-export shim under src/renderers/graph/. All src/graph + src/renderers + architecture tests pass (197). Unrelated pre-existing failure in src/probes/structured-exchange-ordering-proof remains (temp extension load), untouched. Amp-Thread-ID: https://ampcode.com/threads/T-019ea862-2101-73ce-8c08-09aca617f03a Co-authored-by: Amp <amp@ampcode.com>
…PLAN.md First fixture hand-derived from real planning prose rather than synthetic placeholders, proving the full loop: prose -> graph fixture -> the real propose-graph validator (seedFixture -> CommandExecutor) -> renderers. .fixtures/seeds/brunch-self/spec-graph.json: one planning_ready spec describing Brunch itself across all four planes. As a by-product of being faithful it covers every node kind and every edge category (both proof/support stances) and includes a supersession lineage. The grouped-list render shows 54 nodes / 30 edges from 55 / 31 authored because the active-context projection (D60-L) correctly hides the superseded predecessor requirement and its dangling edge. src/renderers/graph/previews.test.ts: locks a whole-spec grouped-list plus REQ1 (one-authority requirement) and MOD1 (CommandExecutor, hops=2) neighborhood previews. Seeding through readGraphSliceFixture also gates structural legality — the test fails if any node/edge is illegal. Validated: src/graph + src/renderers (195 tests) pass. Amp-Thread-ID: https://ampcode.com/threads/T-019ea862-2101-73ce-8c08-09aca617f03a Co-authored-by: Amp <amp@ampcode.com>
…e) + validate-fixture CLI Hand-derive structurally-legal spec graphs from four external projects' prose docs to exercise the propose-graph validator and graph renderers beyond the brunch-self example: - dumpchat 41 nodes / 33 edges (docs/SPEC.md, mostly faithful intent/design) - yamlbase 69 nodes / 65 edges (memory/SPEC.md + PLAN.md) - rd-loop 54 nodes / 35 edges (README + concept docs, more projection) - fable 67 nodes / 37 edges (memory/SPEC.md + ROADMAP.md) Each covers all four planes, every node kind, all eight edge categories, both proof/support stances, and one acyclic supersession lineage. Add src/graph/validate-fixture.ts, a standalone CLI that seeds one fixture through the real CommandExecutor and reports authored/stored/active-context counts, so fixtures can be authored and validated without test-file contention. Amp-Thread-ID: https://ampcode.com/threads/T-019ea862-2101-73ce-8c08-09aca617f03a Co-authored-by: Amp <amp@ampcode.com>
ce8dbcd to
f9ce635
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit f9ce635. Configure here.
|
|
||
| Paste this into a new session: | ||
|
|
||
| > Read `HANDOFF.md` in the workspace root. We are in a level-by-level graph read/render redesign, not a global reconciliation pass. The graph PULL API has already been reshaped to `queryGraph(filter?, options?) -> GraphSlice` and `getNodes(selectors, options?) -> NodeNeighborhood[]` in unstaged files. The immediate next step is to review concrete LLM renderings of `GraphSlice` and `NodeNeighborhood`: start by reading `src/renderers/graph/neighborhood.ts`, `src/.pi/extensions/graph/command-adapter.ts`, and the handoff's rendering survey, then produce compact preview options for `GraphSlice` before touching docs or running full verification. |
There was a problem hiding this comment.
Volatile handoff committed
Low Severity
HANDOFF.md is generated volatile transfer state from ln-handoff, explicitly meant to be overwritten or deleted after reconciliation. The added file captures a separate graph read/render redesign session, branch dirty lists, and resume prompts unrelated to the FE-811 ship-gate work described in the PR.
Reviewed by Cursor Bugbot for commit f9ce635. Configure here.



Regenerate fixture curation graph overview
Regenerate project graph review overview
Guard probe reports against retired graph tokens
Label non-anchor related edges as lateral
Use live graph nodes for mention autocomplete
Reconcile FE-811 ship gate cleanup